home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Best of MacTutor - S…e Code for Volumes 1 to 5
/
The Best of MacTutor - Source Code for Volume 1-5 (Wayzata Technology)(6031)(1990).bin
/
Source Code
/
#43 (Apr 89)
/
Designer CDEF Code
/
InitTheMenus.Pas
< prev
next >
Wrap
Pascal/Delphi Source File
|
1988-12-27
|
1KB
|
39 lines
UNIT InitTheMenus;
INTERFACE
PROCEDURE Init_My_Menus; {Initialize the menus}
VAR
AppleMenu : MenuHandle; {Used to handle DAs, needed for later use}
IMPLEMENTATION
PROCEDURE Init_My_Menus; {Initialize the menus}
CONST
Menu1 = 201; {Menu resource ID}
Menu2 = 202; {Menu resource ID}
VAR
tempMenu : MenuHandle; {Throw away all other menu handles}
BEGIN {Start of Init_My_Menus}
ClearMenuBar; {Clear any old menu bars}
{ This menu is the APPLE menu, used for About and desk accessories.}
tempMenu := GetMenu(Menu1); {Get the menu from the resource file}
AddResMenu(tempMenu, 'DRVR'); {Add in DAs}
InsertMenu(tempMenu, 0); {Insert this menu into the menu bar}
AppleMenu := tempMenu; {Save this menu handle for later use}
{ This menu is File }
tempMenu := GetMenu(Menu2); {Get the menu from the resource file}
InsertMenu(tempMenu, 0); {Insert this menu into the menu bar}
DrawMenuBar; {Draw the menu bar}
END; {End of procedure Init_My_Menus}
END.